package first.endtoend
/**
 * Created with IntelliJ IDEA.
 * User: Olfa
 */
class Beneficiary
{

    String tataId
    String firstName
    String lastName
    String photoURL
    static belongsTo = [family: Family]

    Date dateCreated
    Date lastUpdated

    static constraints = {
        firstName nullable: false
        lastName nullable: false
        family(nullable: true)
        photoURL(nullable: true)
        tataId nullable: true
    }
    static mapping = {
        // family cascade: "delete"

        // address cascade: "delete"
    }

    @Override
    public String toString()
    {
        firstName + " " + lastName
    }

}
